package com.zzyl.mapper;

import com.github.pagehelper.Page;
import com.zzyl.entity.Role;
import com.zzyl.entity.RoleResource;
import com.zzyl.entity.User;
import com.zzyl.entity.UserRole;
import com.zzyl.vo.RoleVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface RoleMapper {

    Page<RoleVo> queryPage(String roleName);

    void insert(RoleVo roleVo);

    List<String> findCheckedResources(Long roleId);

    void deleteResourceByRoleId(Long id);

    void updateRole(Role role);

    Role selectById(Long id);

    List<UserRole> selectUserByRoleId(Long id);

    void addResourceByRoleId(RoleResource roleResource);

    List<RoleVo> findRoleVoListInUserId(@Param("userIds") List<Long> userIds);

}
